package com.vader.admin.Enum;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 积分类型枚举类
 *
 * @author kaivader
 * @date 2021/10/08
 */
@Getter
@AllArgsConstructor
public enum IntegrationEnum {

    DRAGONPEARL(3, "dragonPearl", "龙珠数量"),
    PEARL_FRAGMENT(1, "pearlFragment", "正常龙珠碎片数量"),
    GIFT_PEARL_FRAGMENT(2, "giftPearlFragment", "可赠送龙珠碎片数量"),
    INTEGRATION(0, "integration", "术值");

    private final Integer type;
    private final String value;
    private final String description;


    public static String get(Integer integraionType) {
        for (IntegrationEnum integrationEnum : IntegrationEnum.values()) {
            if (integraionType.equals(integrationEnum.getType())) {
                return integrationEnum.getValue();
            }
        }
        return null;
    }
}
